mcN = "letter"; alphaSpeed = Math.floor((100 - alpha) / ((scale-100)/speed)); rotateSpeed = Math.floor(angle / ((scale-100)/speed)); aLetters = new Array(); for (i = 0; i< numChar; i++){ aLetters[i+0] = i; var letter = this[mcN +i]; letter._visible = false; letter.init = letterInit; letter.doEffect = effect; letter.number = i; } function letterInit(){ this._visible = true; this.speed = this._parent.speed; this._xscale = this._parent.scale; this._yscale = this._parent.scale; this._alpha = this._parent.alpha; this.alphaSpeed = this._parent.alphaSpeed; this._rotation = this.angle; this.rotateSpeed = this._parent.rotateSpeed; } function effect(){ this._xscale -= this.speed; this._yscale -= this.speed; this._alpha += this.alphaSpeed; this._rotation -= this.rotateSpeed; if (this._xscale <= 100){ this._xscale = 100; this._yscale = 100; this._alpha = 100; this._rotation = 0; this.gotoAndStop("end"); } } function shuffle(){ return Math.floor(Math.random() * 3) -1; } if (random == 1){ aLetters.sort(shuffle); } if (reverse == 1){ aLetters.reverse(); }